package zhuyun.code.datamanager

import com.google.android.material.snackbar.Snackbar
import org.junit.Test

import org.junit.Assert.*
import java.sql.Connection
import java.sql.DriverManager

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    val URL="jdbc:mysql://rdsz4kl5za13u8d0m3i8spublic.mysql.rds.aliyuncs.com:3306/chnspec?useUnicode=true&characterEncoding=UTF-8"
    val USER = "spec3205722251"
    val PASSWORD = "spec3205722251"
    val DRIVER_NAME = "com.mysql.jdbc.Driver"
    @Test
    fun connectMySql() {
//        Class.forName(DRIVER_NAME)
//        var conn: Connection? = DriverManager.getConnection(URL, USER, PASSWORD
        var t: Boolean = false
        if (t) {
            println("true")
        } else if(!t) {
            println("false")
        }
    }
}
